<template>
  <div class="wa-card wa-notice-time">
    <h2 class="wa-m0">
      公告通知时间线
    </h2>
    <el-timeline style="max-width: 600px;margin-top: 20px;">
      <el-timeline-item
          v-for="(activity, index) in data"
          :key="index"
          type="primary"
          :hollow="true"
          :timestamp="activity.date"
      >
        {{ activity.content.substring(0,40) }}...
      </el-timeline-item>
    </el-timeline>
  </div>
</template>

<script setup>
import {defineProps} from 'vue'

defineProps({
  data: {
    type: Array,
    required: true
  }
})
</script>

<style lang="less" scoped>
.wa-notice-time {
  margin-right: 20px;
  height: 350px;
}
</style>